using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using TestModels.Models.Mapping;

namespace TestModels.Models
{
    public partial class zosnnContext : DbContext
    {
        static zosnnContext()
        {
            Database.SetInitializer<zosnnContext>(null);
        }

        public zosnnContext()
            : base("Name=DefaultConnection")
        {
        }

        public DbSet<Collect> Collects { get; set; }
        public DbSet<Order> Orders { get; set; }
        public DbSet<Order_Info> Order_Info { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<Product_Info> Product_Info { get; set; }
        public DbSet<Product_Type> Product_Type { get; set; }
        public DbSet<Seller> Sellers { get; set; }
        public DbSet<Seller_Area> Seller_Area { get; set; }
        public DbSet<User> Users { get; set; }
        public DbSet<User_Info> User_Info { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CollectMap());
            modelBuilder.Configurations.Add(new OrderMap());
            modelBuilder.Configurations.Add(new Order_InfoMap());
            modelBuilder.Configurations.Add(new ProductMap());
            modelBuilder.Configurations.Add(new Product_InfoMap());
            modelBuilder.Configurations.Add(new Product_TypeMap());
            modelBuilder.Configurations.Add(new SellerMap());
            modelBuilder.Configurations.Add(new Seller_AreaMap());
            modelBuilder.Configurations.Add(new UserMap());
            modelBuilder.Configurations.Add(new User_InfoMap());
        }
    }
}
